home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / mac / PageMaker 6.5 SDK Mac / SourceCode / PageMakerClassLibrary / LowLevel / PPluginCall.h < prev    next >
C/C++ Source or Header  |  1996-08-20  |  2KB  |  63 lines

  1. /*
  2.  *--- PPluginCall.h -------------------------------------------------------
  3.  * Copyright (c) 1995-96 Adobe Systems Incorporated.  All rights reserved.
  4.  * Created on Thu, Oct 12, 1995 @ 9:50 PM by Paul Ferguson.
  5.  *
  6.  * Description:
  7.  *-------------------------------------------------------------------------
  8.  */
  9. #ifndef __PPluginCall__
  10. #define __PPluginCall__
  11.  
  12. #include "PMTypes.h"
  13. #include "PMCQErrs.h"
  14.  
  15. class PPluginCall
  16. {
  17.  
  18. public:
  19.  
  20.     PPluginCall();
  21.  
  22.     void            Dispatch();
  23.     void            BuildErrorMessages(const char * errText, const char * cantText = NULL);
  24.  
  25.     short            GetOpCode()  { return sPB->opCode; }
  26.     unsigned long    GetSubCode() { return sPB->subCode; }
  27.  
  28.     void *            GetPluginData()         { return sPMMessage->pPlugInData; }
  29.     void            SetPluginData(void * h)    { sPMMessage->pPlugInData = h; }
  30.  
  31.     operator        const sPMParamBlock&() const { return *sPB; }
  32.     
  33. protected:
  34.  
  35.     // Your subclass should override any of these that you want to handle.
  36.     virtual void    DoLoad() {};
  37.     virtual void    DoRegister() {};
  38.  
  39.     virtual void    DoInvoke() {};
  40.  
  41.     virtual void    DoEvent() {};
  42.     virtual void    DoSysEvent() {};
  43.  
  44.     virtual void    DoAcquireInterface() {};
  45.     virtual void    DoReleaseInterface() {};
  46.     
  47.     virtual void    DoUnload() {};
  48.     virtual void    DoShutdown() {};
  49.  
  50.     static sPMParamBlockPtr    sPB;
  51.     static PMMessage *        sPMMessage;
  52.  
  53. private:
  54.  
  55.     // This class and its subclasses cannot be copied.
  56.     PPluginCall(PPluginCall&);
  57.     PPluginCall& operator=(const PPluginCall&);
  58. };
  59.  
  60. #endif
  61.  
  62. // end of PPluginCall.h
  63.